package com.zbkj.front.controller;

import com.zbkj.common.model.AiBackground;
import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.PageParamRequest;
import com.zbkj.common.result.CommonResult;
import com.zbkj.service.service.AiBackgroundService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;


/**
 * ai试衣背景图表 前端控制器
 */
@Slf4j
@RestController
@RequestMapping("api/front/ai-background")
@Api(tags = "ai试衣背景图")
public class AiBackgroundController {

    @Autowired
    private AiBackgroundService aiBackgroundService;


    @ApiOperation(value = "查询ai试衣背景图列表")
    @RequestMapping(value = "/list", method = RequestMethod.POST)
    public CommonResult<CommonPage<AiBackground>> getList(@Validated PageParamRequest pageParamRequest) {
        CommonPage<AiBackground> aiBackgroundCommonPage = CommonPage.restPage(aiBackgroundService.getFrontList(pageParamRequest));
        return CommonResult.success(aiBackgroundCommonPage);
    }


}



